	LCD_RST=1;
	delay_ms(2); // delay 50 ms 
	LCD_RST=0;
	delay_ms(10); //
	LCD_RST=1;
	delay_ms(120); //	

		LCD_WR_REG(0x11); //Exit Sleep
		delay_ms(120);

		LCD_WR_REG(0xB2);  
		LCD_WR_DATAX(0x0C); 
		LCD_WR_DATAX(0x0C); 
		LCD_WR_DATAX(0X00); 
		LCD_WR_DATAX(0X33);
		LCD_WR_DATAX(0X33); 

		LCD_WR_REG(0x35);   
		LCD_WR_DATAX(0x00);   
		
		LCD_WR_REG(0x36);    // Memory Access Control ST7789
		LCD_WR_DATAX(0x00); //
		LCD_WR_REG(0x3A);   
		LCD_WR_DATAX(0x55); 			

		LCD_WR_REG(0xB7);   
		LCD_WR_DATAX(0x55);   
		LCD_WR_REG(0xBB);    // 
		LCD_WR_DATAX(0x1D); //Vcom设定，改善点闪现象

		LCD_WR_REG(0xC0);    // 
		LCD_WR_DATAX(0x2C); 
		LCD_WR_REG(0xC2);    //
		LCD_WR_DATAX(0x01); 
		LCD_WR_REG(0xC3);  
		LCD_WR_DATAX(0x13); //此参数可微调对比度，值小变亮
//		LCD_WR_REG(0xC4);  
//		LCD_WR_DATAX(0x20); 
		LCD_WR_REG(0xC6);  
		LCD_WR_DATAX(0x0F); 

		LCD_WR_REG(0xD0);  
		LCD_WR_DATAX(0xA7); 
		LCD_WR_REG(0xD0);  
		LCD_WR_DATAX(0xA4); 
		LCD_WR_DATAX(0xA1); 

		LCD_WR_REG(0xD6);  
		LCD_WR_DATAX(0xA1); 

		LCD_WR_REG(0xE0);    //Set Gamma 
		LCD_WR_DATAX(0xF0); 
		LCD_WR_DATAX(0x05); 
		LCD_WR_DATAX(0x0D); 
		LCD_WR_DATAX(0x0B); 
		LCD_WR_DATAX(0x0A); 
		LCD_WR_DATAX(0x07); 
		LCD_WR_DATAX(0x31); 
		LCD_WR_DATAX(0X44); 
		LCD_WR_DATAX(0x48); 
		LCD_WR_DATAX(0x37); 
		LCD_WR_DATAX(0x13); 
		LCD_WR_DATAX(0x12); 
		LCD_WR_DATAX(0x2E); 
		LCD_WR_DATAX(0x35); 

		LCD_WR_REG(0XE1);    //Set Gamma 
		LCD_WR_DATAX(0xF0); 
		LCD_WR_DATAX(0x06); 
		LCD_WR_DATAX(0x0A); 
		LCD_WR_DATAX(0x08); 
		LCD_WR_DATAX(0x07); 
		LCD_WR_DATAX(0x23); 
		LCD_WR_DATAX(0x31); 
		LCD_WR_DATAX(0x43); 
		LCD_WR_DATAX(0x47); 
		LCD_WR_DATAX(0x18); 
		LCD_WR_DATAX(0x14); 
		LCD_WR_DATAX(0x14); 
		LCD_WR_DATAX(0x2F); 
		LCD_WR_DATAX(0x36); 

		LCD_WR_REG(0x2A); 
		LCD_WR_DATAX(0x00);
		LCD_WR_DATAX(0x23);
		LCD_WR_DATAX(0x00);
		LCD_WR_DATAX(0xCC);//EF	
		LCD_WR_REG(0x2B); 
		LCD_WR_DATAX(0x00);
		LCD_WR_DATAX(0x00);
		LCD_WR_DATAX(0x01);
		LCD_WR_DATAX(0x3f);

		LCD_WR_REG(0x21); 

		LCD_WR_REG(0x29); //display on		